﻿using ASmile.Com.Da;
using ASmile.DBModel;
using Microsoft.AspNetCore.Mvc;

namespace ASmile.Web.ApiControllers.SysManage
{
    [Route("api/SysManage/[controller]/[action]")]
    [ApiExplorerSettings(GroupName = "SysManage")]
    public class PrintConfigController : BaseApiCrudController<PrintConfigBLL, Sys_PrintConfig>
    {
        /// <summary>
        /// 获取指定窗体的打印配置(缓存获取)
        /// {"formName":"窗体全称","printIndex":(int 索引)}
        /// </summary>
        [HttpPost]
        public ApiResult<Sys_PrintConfig> GetPrintConfig(string formName, int printIndex)
        {
            return BLLObj.GetPrintConfig(formName, printIndex);
        }
        /// <summary>
        /// 获取指定窗体的打印配置(当前用户有效)
        /// {"formName":"窗体全称"}
        /// </summary>
        [HttpPost]
        public ApiResultList<Sys_PrintConfig> GetPrintConfigs(string formName)
        {
            return BLLObj.GetPrintConfigs(formName);
        }
    }
}
